<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>new</title>
</head>
<body>
	<script type="text/javascript">
		//打印	
		/* 	name = "姓名"
				age = 12
				document.writeln("我的信息\n" + name + "\n" + age); */

		//对话框
		/* var name = "my"
		var age = 12
		alert("我的姓名：" + name + "年龄" + age) */

		//类型
		/* var a = 323;
		var ta = isNaN(a);
		document.write(ta) */

		//数组 循环
		/* 	var tvs = new Array("a", "b", "c", 4);
			for (n in tvs) {
				document.writeln(tvs[n]);
			} */

		//函数
		/* function User(name, age) {
			this.name = name;
			this.age = age;
		}
		var user = new User("user", "age");
		document.write("姓名：" + user.name + "\n年龄" + user.age); */

		//输入
		var input = prompt("请输入一个字符", "")
		if (!isNaN(input)&&input.length>0) {
			alert("这是一个数字")
		} else {
			alert("这不是数字")
		}
	</script>
</body>
</html>